using System;
using System.Windows.Forms;
using Preparation;
using Tester.Forms;

namespace Tester.GuiActions.Actions.Impl
{
    public class SettingsAction : BaseAction
    {
        public override bool Visible
        {
            get
            {
                return (TesterMultyDocument.Instance == null || 
                      TesterMultyDocument.Instance.Suspended == TesterMultyDocument.SuspendStates.Stopped) &&
                      (TesterMainForm.Instance.TopControl != EmbededControlTags.Settings);
            }
        }

        public override void MainAction(object sender, EventArgs e)
        {
            AdvancedTesterSettings sett = new AdvancedTesterSettings();
            sett.Dock = DockStyle.Left;
            TesterMainForm.Instance.PushControl(sett); 
        }
    }
}
